package com.asiainfo.order.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * 实现feign拦截器接口，实现apply方法
 */

//@Component
public class XTokenRequestIntercepter implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        //添加头信息TOKEN
        requestTemplate.header("Token", UUID.randomUUID().toString());
    }
}
